//
//  AcoutLiftCollectionViewCell.m
//  MarryMe
//
//  Created by lanou3g on 16/1/14.
//  Copyright © 2016年 revocher. All rights reserved.
//

#import "AcoutLiftCollectionViewCell.h"
#import "Mothy.h"
@implementation AcoutLiftCollectionViewCell

- (void)awakeFromNib {
    UITapGestureRecognizer *rightTapGR=[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(rightTapGRAction:)];
    [self.lifteImageView addGestureRecognizer:rightTapGR];
    self.lifteImageView.userInteractionEnabled=YES;
    self.endButton.hidden=YES;
    self.deleteButton.hidden=YES;
    
    [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(buttonAction:) name:@"name" object:nil];
    
}

-(void)buttonAction:(NSNotification*)sender{
      self.endButton.hidden=YES;
      self.deleteButton.hidden=YES;

}


-(void)rightTapGRAction:(UITapGestureRecognizer*)sender{
        if (self.endButton.hidden==YES) {
            self.endButton.hidden=NO;
           self.deleteButton.hidden=NO;
        }else{
            self.endButton.hidden=YES;
            self.deleteButton.hidden=YES;
        }
    
}
-(void)setCellDateForModel:(Mothy *)model{
    self.lifteImageView.image=[UIImage imageNamed:model.picture];
    NSMutableString *str= [[NSMutableString alloc] initWithString:@"收到 "];
    [str appendString:model.name];
    [str appendString:@" "];
    [str appendString:model.closed];
    self.userLable.text=str;
}
@end
